﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace GrewalCRM.Entities
{
  [Serializable]
  public class ACBrands : BaseEntitiesGrewalCRM
  {
    #region Members      
    private string aCBrandName;
    private string description;
    #endregion

    #region Constructors
    /// <summary>
    /// Create a new instance using the default constructor
    /// </summary>
    public ACBrands()
    {
      
    }
    
    /// <summary> 
    /// Create a new object by specifying all fields (except the auto-generated primary key field). 
    /// </summary> 
    public ACBrands(string aCBrandName, string description, UserCRM lastModifiedUser)
      : base(lastModifiedUser)
    {
      this.aCBrandName = aCBrandName;
      this.description = description;
    }

     /// <summary> 
    /// Create an object from an existing row of data with only ID feild 
    /// </summary> 
    public ACBrands(int aCBrandID)
      : base(aCBrandID,false, null, null)
    {
      
    }

    /// <summary> 
    /// Create an object from an existing row of data. This will be used by Gentle to 
    /// construct objects from retrieved rows. 
    /// </summary> 
    public ACBrands(int aCBrandID, string aCBrandName, string description, UserCRM lastModifiedUser, DateTime? lastModifiedDateTime)
      : base(aCBrandID, lastModifiedUser, lastModifiedDateTime)
    {      
      this.aCBrandName = aCBrandName;
      this.description = description;
    }

    /// <summary> 
    /// Create an object from an existing row of data. This will be used by Gentle to 
    /// construct objects from retrieved rows. 
    /// </summary> 
    public ACBrands(int aCBrandID, string aCBrandName, string description, bool isActive, UserCRM lastModifiedUser, DateTime? lastModifiedDateTime)
      : base(aCBrandID, isActive, lastModifiedUser, lastModifiedDateTime)
    {
      this.aCBrandName = aCBrandName;
      this.description = description;
    }
    #endregion

    #region Public Properties    
    /// <summary>
    /// Property relating to database column StatusName
    /// </summary>    
    public string ACBrandName
    {
      get { return aCBrandName != null ? aCBrandName.TrimEnd() : string.Empty; }
      set { IsChanged |= aCBrandName != value; aCBrandName = value; }
    }

    /// <summary>
    /// Property relating to database column Description
    /// </summary>    
    public string Description
    {
      get { return description != null ? description.TrimEnd() : string.Empty; }
      set { IsChanged |= description != value; description = value; }
    }

    
    #endregion
  }
}
